import { request } from '@/utils/request.js'

/**
 * 新人奖励设置 API JS
 */

export default {

  /**
   * 获取新人奖励设置分页列表
   * @returns
   */
  getList (params = {}) {
    return request({
      url: 'activity/first/index',
      method: 'get',
      params
    })
  },

  getInitData (params = {}) {
    return request({
      url: 'activity/first/getInitData',
      method: 'get',
      params
    })
  },

  /**
   * 添加新人奖励设置
   * @returns
   */
  save (data = {}) {
    return request({
      url: 'activity/first/save',
      method: 'post',
      data
    })
  },

  /**
   * 添加新人奖励设置
   * @returns
   */
  saveProduct (data = {}) {
    return request({
      url: 'activity/first/saveProduct',
      method: 'post',
      data
    })
  },

  /**
   * 添加新人奖励设置
   * @returns
   */
  saveMoney (data = {}) {
    return request({
      url: 'activity/first/saveMoney',
      method: 'post',
      data
    })
  },

  /**
   * 更新新人奖励设置数据
   * @returns
   */
  update (id, data = {}) {
    return request({
      url: 'activity/first/update/' + id,
      method: 'put',
      data
    })
  },

  /**
   * 读取新人奖励设置
   * @returns
   */
  read (id) {
    return request({
      url: 'activity/first/read/' + id,
      method: 'get',
      data
    })
  },

  /**
   * 将新人奖励设置删除，有软删除则移动到回收站
   * @returns
   */
  deletes (data) {
    return request({
      url: 'activity/first/delete',
      method: 'delete',
      data
    })
  },

  /**
   * 从回收站获取新人奖励设置数据列表
   * @returns
   */
  getRecycleList (params = {}) {
    return request({
      url: 'activity/first/recycle',
      method: 'get',
      params
    })
  },

  /**
   * 恢复新人奖励设置数据
   * @returns
   */
  recoverys (data) {
    return request({
      url: 'activity/first/recovery',
      method: 'put',
      data
    })
  },

  /**
   * 真实删除新人奖励设置
   * @returns
   */
  realDeletes (data) {
    return request({
      url: 'activity/first/realDelete',
      method: 'delete',
      data
    })
  },

  /**
   * 修改新人奖励设置数值数据，自增自减
   * @returns
   */
  numberOperation (data = {}) {
    return request({
      url: 'activity/first/numberOperation',
      method: 'put',
      data
    })
  },

  /**
   * 更改新人奖励设置数据
   * @returns
   */
  changeStatus (data = {}) {
    return request({
      url: 'activity/first/changeStatus',
      method: 'put',
      data
    })
  },

  /**
    * 新人奖励设置导入
    * @returns
    */
  importExcel (data = {}) {
    return request({
      url: 'activity/first/import',
      method: 'post',
      data
    })
  },

  /**
   * 新人奖励设置下载模板
   * @returns
   */
  downloadTemplate () {
    return request({
      url: 'activity/first/downloadTemplate',
      method: 'post',
      responseType: 'blob'
    })
  },

  /**
   * 新人奖励设置导出
   * @returns
   */
  exportExcel (params = {}) {
    return request({
      url: 'activity/first/export',
      method: 'post',
      responseType: 'blob',
      params
    })
  },


}